package com.wuxin.ssm.mapper;

import com.wuxin.ssm.entity.Carshop;
import com.wuxin.ssm.entity.CarshopExample;
import com.wuxin.ssm.vo.ShopVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CarshopMapper {

    /**
     * 根据用户编号查询购物车信息
     * @param uid
     * @return
     */
    List<Carshop> getAllCarShopByUserId(Integer uid);

    /**
     * 查询购物车中是否存在该商品
     * @param carshop
     * @return
     */
    Carshop findByUidAndPid(Carshop carshop);



    int countByExample(CarshopExample example);

    int deleteByExample(CarshopExample example);

    int deleteByPrimaryKey(Integer cid);

    int insert(Carshop record);

    int insertSelective(Carshop record);

    List<Carshop> selectByExample(CarshopExample example);

    Carshop selectByPrimaryKey(Integer cid);

    int updateByExampleSelective(@Param("record") Carshop record, @Param("example") CarshopExample example);

    int updateByExample(@Param("record") Carshop record, @Param("example") CarshopExample example);

    int updateByPrimaryKeySelective(Carshop record);

    int updateByPrimaryKey(Carshop record);


    void deleteByPrimaryKey2(ShopVo shopVo);
}